home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_srgp.lha / srgp / src / srgp_cursor.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-09  |  860 b   |  47 lines

  1. #include "HEADERS.h"
  2. #include "srgplocal.h"
  3.  
  4.  
  5. void
  6. SRGP_loadCursor (int index, int shape)
  7. {
  8.    DEBUG_AIDS{
  9.       SRGP_trace (SRGP_logStream, "SRGP_loadCursor %d %d\n", index, shape);
  10.       srgp_check_system_state();
  11.       srgp_check_cursor_index(index);
  12.       LeaveIfNonFatalErr();
  13.    }
  14.  
  15. #ifdef X11
  16.    srgp__cursorTable[index] = XCreateFontCursor (srgpx__display, shape);
  17. #endif
  18.  
  19. #ifdef THINK_C
  20.    srgp__cursorTable[index] = GetCursor (shape);
  21. #endif
  22.  
  23.    SRGP__updateLocatorCursorShape ();
  24. }
  25.  
  26.  
  27.  
  28.  
  29. #ifdef THINK_C
  30. #define cursortype CursHandle
  31. #endif
  32. #ifdef X11
  33. #define cursortype Cursor
  34. #endif
  35.  
  36. void SRGP__initCursorTable (void)
  37. {
  38.    register i;
  39.  
  40.    for (i=0; i<=MAX_CURSOR_INDEX; i++)
  41.       srgp__cursorTable[i] = (cursortype)NULL;
  42.  
  43. #ifdef THINK_C
  44.    srgp__cursorTable[0] = (CursHandle)(-1);  
  45.         /* special value representing the arrow cursor */
  46. #endif
  47. }